 #include <boost/variant.hpp>
 #include <string>
 #include <iostream>

 #include <mockpp/mockpp.h>
 #include <mockpp/VisitableMockObject.h>
 #include <mockpp/chaining/ChainingMockObjectSupport.h>

 using namespace std;
 using namespace boost;

typedef variant<int, string> var_t;

 MOCKPP_NS::String& operator<<(MOCKPP_NS::String& s, const var_t& t)
 {
   s << MOCKPP_PCHAR("var_t");
   return s;
 }

 class Foo
 {
 public:
 virtual int bar ( const var_t& ){}
 };

 class mock : public MOCKPP_NS::VisitableMockObject,
 public Foo
 {
   public:
 mock ():
 VisitableMockObject (MOCKPP_PCHAR("mock"), 0 ),
 MOCKPP_CONSTRUCT_MEMBERS_FOR_VISITABLE_EXT1 ( bar, ext)
 {}

 MOCKPP_VISITABLE_EXT1
 (
 mock, int, bar, const var_t&,
       int, ext, var_t
 );
 };

 int main (int argc, char* argv[])
 {
   var_t vt;
   mock mo;
   mo.bar(vt);
   std::cout << "ready" << std::endl;
 }
